
* OPEN STATA OUTPUT FILE LOG *

log using "C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\PAR R&R\Statistics\Age_Discrimination.APPENDIX 2.NONLINEAR FUNCTIONAL FORM ANALYSES.06-02-2022.smcl" 
   
   

use "C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\PAR R&R\Statistics\Age_Discrimination.Post-Estimation.06-02-2022.dta", replace 




**** 2022 PAR Data Replication [06/02/2022]: "STATUS-GROUP POWER DIFFERENTIALS AND AGE DISCRIMINATION WITHIN THE U.S. FEDERAL WORKFORCE" [KRAUSE & PARK] ****

 



 
**** APPENDIX SECTION 2: COLLINEARITY OF HIGHER POWERS AND LOWER MODEL FIT OF NONLINEAR FUNCTIONAL FORM RELATING TO PRIMARY COVARIATES OF INTEREST *****
 
 

*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
 
xtset a_id year, yearly

*
* 
 
 
***  APPENDIX SECTION A2.1A: BIVARIATE CORRELATIONS AND VIF ANALYSIS FROM BETWEEN-EFFECTS MODELS [BASIS FOR MAIN EVIDENCE CONSISTENT WITH STATUS-GROUP POWER DIFFERENTIALS] ***



*** STEP 1: COLLAPSE DATASET INTO BETWEEN-EFFECTS [AGENCY GROUP MEANS] FOR PURPOSES OF EVALUATING AGENCY-MEANS OF ALL VARIABLES **

collapse age_discrimination ratio_40over_suplb  ratio_40over_nonsuplb  ratio40suplb_nonsuplb      orgjustice_sem  nonprof40over_tr_lb  ///
politicization_lb   ratio_fsup_msup ratio_minsup_nonmsup lntwf, by(a_id)
*
*
*
** STEP 2: EVALUATE COLLINEARITY ARISING FROM HIGHER POWERS OF 'ORGANIZATIONAL SUSCEPTIBILITY' COVARIATES USING BIVARIATE CORRELATIONS AND VIFs **

** STEP 2a: FOR THE PROPORTION OF 'OLDER' SUPERVISORY PERSONNEL WITHIN AN AGENCY **
gen ratio_40over_suplb_quad  =  ratio_40over_suplb^2
gen ratio_40over_suplb_cubic =  ratio_40over_suplb^3
*
*
correlate ratio_40over_suplb ratio_40over_suplb_quad ratio_40over_suplb_cubic 
*
regress age_discrimination ratio_40over_suplb ratio_40over_suplb_quad ratio_40over_suplb_cubic 
estat vif
*
*
*
** STEP 2b: FOR THE PROPORTION OF 'OLDER' NON-SUPERVISORY PERSONNEL WITHIN AN AGENCY **
gen ratio_40over_nonsuplb_quad  =  ratio_40over_nonsuplb^2
gen ratio_40over_nonsuplb_cubic =  ratio_40over_nonsuplb^3
*
*
correlate ratio_40over_nonsuplb ratio_40over_nonsuplb_quad ratio_40over_nonsuplb_cubic 
*
regress age_discrimination ratio_40over_nonsuplb ratio_40over_nonsuplb_quad ratio_40over_nonsuplb_cubic 
estat vif
*
*
*
*
** STEP 2C: FOR THE RATIO OF THE PROPORTION OF 'OLDER' SUPERVISORY PERSONNEL TO 'OLDER' NON-SUPERVISORY PERSONNEL WITHIN AN AGENCY **
gen ratio40suplb_nonsuplb_quad  =  ratio40suplb_nonsuplb ^2
gen ratio40suplb_nonsuplb_cubic =  ratio40suplb_nonsuplb ^3

*
*
correlate ratio40suplb_nonsuplb  ratio40suplb_nonsuplb_quad ratio40suplb_nonsuplb_cubic 
*
regress age_discrimination ratio40suplb_nonsuplb  ratio40suplb_nonsuplb_quad ratio40suplb_nonsuplb_cubic 
estat vif



save "C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\PAR R&R\Statistics\collapsedagediscrim1.06-02-2022.dta", replace 
*
*
*
*

*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
 

 
***  APPENDIX SECTION A2.1B: EVALUATE LINEAR VERSUS SQUARED POWERS BASED ON MODEL FIT (BIC) STATISTICS FROM HYBRID PANEL MODELS ***



use "C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\PAR R&R\Statistics\Age_Discrimination_Dataset_06-02-2022.dta", replace 


xtset a_id year, yearly

*
*

** STEP 1: CREATE VALUATE LINEAR VERSUS SQUARED POWERS POWERS BASED ON MODEL FIT (BIC) STATISTICS:  **

gen ratio_40over_suplb_quad  =  ratio_40over_suplb^2
*   
gen ratio_40over_nonsuplb_quad  =  ratio_40over_nonsuplb^2
*
gen ratio40suplb_nonsuplb_quad  =  ratio40suplb_nonsuplb ^2
 



*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
 


** MODEL A2.1: DISAGGREGATE SUPERVISOR/SUBORDINATE RATIO MEASURES [ratio_40over_suplb; ratio_40over_nonsuplb]: ONLY RANDOM INTERCEPT MODEL SPECIFICATION WITH BE & WE ESTIMATES FOR ALL COVARIATES [SANS YEAR UNIT EFFECTS & LN(TOTAL WORKFORCE)] --- REDUCED MODEL: ONLY CONTROL COVARIATES ARE LNTEF & YEAR UNIT EFFECTS ***

*
*** LINEAR FUNCTIONAL FORM ***
quietly xthybrid age_discrimination  ratio_40over_suplb  ratio_40over_nonsuplb   lntwf ///
yr2 yr3 yr4 yr5 yr6 yr7 yr8 yr9 yr10 ratio_55over_totallb , clusterid(a_id) vce(cluster a_id)  family(nbinomial) link(log) full ///
use(ratio_40over_suplb  ratio_40over_nonsuplb  ratio_55over_totallb) 
*
estat ic

*
*
*
*** QUADRATIC FUNCTIONAL FORM ***
quietly xthybrid age_discrimination  ratio_40over_suplb  ratio_40over_suplb_quad   ratio_40over_nonsuplb  ratio_40over_nonsuplb_quad  lntwf ///
yr2 yr3 yr4 yr5 yr6 yr7 yr8 yr9 yr10  ratio_55over_totallb , clusterid(a_id) vce(cluster a_id)  family(nbinomial) link(log) full ///
use(ratio_40over_suplb ratio_40over_suplb_quad   ratio_40over_nonsuplb  ratio_40over_nonsuplb_quad  ratio_55over_totallb) 
*
estat ic
*
*
*


*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************



** MODEL A2.2: DISAGGREGATE SUPERVISOR/SUBORDINATE RATIO MEASURES [ratio_40over_suplb; ratio_40over_nonsuplb]: ONLY RANDOM INTERCEPT MODEL SPECIFICATION WITH BE & WE ESTIMATES FOR ALL COVARIATES [SANS YEAR UNIT EFFECTS & LN(TOTAL WORKFORCE)] --- FULL MODEL: ALL CONTROL COVARIATES ARE LNTEF & YEAR UNIT EFFECTS ***

*** LINEAR FUNCTIONAL FORM ***
quietly xthybrid age_discrimination  ratio_40over_suplb  ratio_40over_nonsuplb   orgjustice_sem   nonprof40over_tr_lb   politicization_lb ratio_fsup_msup ratio_minsup_nonmsup lntwf ///
yr2 yr3 yr4 yr5 yr6 yr7 yr8 yr9 yr10 ratio_55over_totallb , clusterid(a_id) vce(cluster a_id)  family(nbinomial) link(log) full ///
use(ratio_40over_suplb  ratio_40over_nonsuplb    orgjustice_sem  nonprof40over_tr_lb   politicization_lb   ratio_fsup_msup ratio_minsup_nonmsup ratio_55over_totallb) 
*
estat ic
*
*
*
*
*
*** QUADRATIC FUNCTIONAL FORM ***
quietly xthybrid age_discrimination  ratio_40over_suplb  ratio_40over_suplb_quad   ratio_40over_nonsuplb  ratio_40over_nonsuplb_quad  orgjustice_sem   nonprof40over_tr_lb politicization_lb ratio_fsup_msup ratio_minsup_nonmsup lntwf yr2 yr3 yr4 yr5 yr6 yr7 yr8 yr9 yr10  ratio_55over_totallb, clusterid(a_id) vce(cluster a_id)  family(nbinomial) link(log) full  use(ratio_40over_suplb  ratio_40over_suplb_quad   ratio_40over_nonsuplb  ratio_40over_nonsuplb_quad  orgjustice_sem  nonprof40over_tr_lb   politicization_lb ratio_fsup_msup ratio_minsup_nonmsup ratio_55over_totallb) 
*
estat ic
*
*
*

*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************



** MODEL A2.3: RATIO OF OVER40 SUPERVISORS TO OVER40 NON-SUPERVISORS [RATIO OF ratio_40over_suplb TO ratio_40over_nonsuplb]: ONLY RANDOM INTERCEPT MODEL SPECIFICATION WITH BE & WE ESTIMATES FOR ALL COVARIATES [SANS YEAR UNIT EFFECTS & LN(TOTAL WORKFORCE)] REDUCED MODEL: ONLY CONTROL COVARIATES ARE LNTEF & YEAR UNIT EFFECTS ***

*** LINEAR FUNCTIONAL FORM ***
quietly xthybrid age_discrimination  ratio40suplb_nonsuplb   lntwf ///
yr2 yr3 yr4 yr5 yr6 yr7 yr8 yr9 yr10  ratio_55over_totallb, clusterid(a_id) vce(cluster a_id)  family(nbinomial) link(log) full ///
use(ratio40suplb_nonsuplb ratio_55over_totallb) 
*
estat ic
*
*
*

*** QUADRATIC FUNCTIONAL FORM ***
quietly xthybrid age_discrimination  ratio40suplb_nonsuplb  ratio40suplb_nonsuplb_quad  lntwf ///
yr2 yr3 yr4 yr5 yr6 yr7 yr8 yr9 yr10  ratio_55over_totallb, clusterid(a_id) vce(cluster a_id)  family(nbinomial) link(log) full ///
use(ratio40suplb_nonsuplb  ratio40suplb_nonsuplb_quad  ratio_55over_totallb) 
*
estat ic
*
*
*

*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************



** MODEL A2.4: RATIO OF OVER40 SUPERVISORS TO OVER40 NON-SUPERVISORS [RATIO OF ratio_40over_suplb TO ratio_40over_nonsuplb]: ONLY RANDOM INTERCEPT MODEL SPECIFICATION WITH BE & WE ESTIMATES FOR ALL COVARIATES [SANS YEAR UNIT EFFECTS & LN(TOTAL WORKFORCE)] --- FULL MODEL: ALL CONTROL COVARIATES ARE LNTEF & YEAR UNIT EFFECTS ***

*** LINEAR FUNCTIONAL FORM ***
quietly xthybrid age_discrimination  ratio40suplb_nonsuplb    orgjustice_sem    nonprof40over_tr_lb     politicization_lb ratio_fsup_msup ratio_minsup_nonmsup lntwf ///
yr2 yr3 yr4 yr5 yr6 yr7 yr8 yr9 yr10 ratio_55over_totallb , clusterid(a_id) vce(cluster a_id)  family(nbinomial) link(log) full ///
use(ratio40suplb_nonsuplb   orgjustice_sem   nonprof40over_tr_lb  politicization_lb   ratio_fsup_msup ratio_minsup_nonmsup ratio_55over_totallb)  
*
estat ic

*
*
*
*

*** QUADRATIC FUNCTIONAL FORM ***
quietly xthybrid age_discrimination  ratio40suplb_nonsuplb   ratio40suplb_nonsuplb_quad   orgjustice_sem    nonprof40over_tr_lb     politicization_lb ratio_fsup_msup  /// 
ratio_minsup_nonmsup lntwf yr2 yr3 yr4 yr5 yr6 yr7 yr8 yr9 yr10  ratio_55over_totallb, clusterid(a_id) vce(cluster a_id)  family(nbinomial) link(log) full ///
use(ratio40suplb_nonsuplb  ratio40suplb_nonsuplb_quad    orgjustice_sem   nonprof40over_tr_lb  politicization_lb   ratio_fsup_msup ratio_minsup_nonmsup ratio_55over_totallb)  
*
estat ic
*
*
*




*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************
*****************************************************************************************************************************************************************************************

log close
